package com.alibaba.basic.util;

/**
 * 工具类：封装增删改的返回值
 */
public class AjaxResult {
    public Boolean success = true;
    public String message = "操作成功";
    public Object resultObj;

    public AjaxResult() {}

    public AjaxResult(Boolean success, String message) {
        this.success = success;
        this.message = message;

    }

    /** 链式语法改造 */
    public static  AjaxResult me() {
        return new AjaxResult();
    }

    /** 链式语法改造 */
    public AjaxResult setSuccess(Boolean success) {
        this.success = success;
        return this;
    }

    public Boolean getSuccess() {
        return success;
    }

    /** 链式语法改造 */
    public AjaxResult setMessage(String  message) {
        this.message = message;
        return this;
    }

    public String getMessage() {
        return message;
    }

    public Object getResultObj() {
        return resultObj;
    }

    /** 链式语法改造 */
    public AjaxResult setResultObj(Object resultObj) {
        this.resultObj = resultObj;
        return this;
    }
}
